import request from '@/utils/request'

/**
 * 货位列表
 * @param {
 * pageIndex：int
 * pageSize：int
 * warehouseLocationCode：int}
 * @returns {Array}
 */
export function getWarehouseLocationPage(data) {
  return request({
    url: '/api/wms/warehouse_location/page',
    method: 'post',
    data
  })
}

/**
 * 新建货位
 * @param {
 * pageIndex：int
 * pageSize：int
 * warehouseLocationCode：int}
 * @returns {Array}
 */
export function saveWarehouseLocation(data) {
  return request({
    url: '/api/wms/warehouse_location/save',
    method: 'post',
    data
  })
}

/**
 * 编辑货位
 * @param {
 * pageIndex：int
 * pageSize：int
 * warehouseLocationCode：int}
 * @returns {Array}
 */
export function updateWarehouseLocation(data) {
  return request({
    url: '/api/wms/warehouse_location/update',
    method: 'post',
    data
  })
}

/**
 * 删除货位
 * @param {
 * pageIndex：int
 * pageSize：int
 * warehouseLocationCode：int}
 * @returns {Array}
 */
export function deleteWarehouseLocation(data) {
  return request({
    url: '/api/wms/warehouse_location/delete',
    method: 'post',
    data
  })
}
